package com.msw.ssh.model;

import java.io.Serializable;

/**
 * 测试Rest的发送和返回Model
 *
 * @Author hadoop
 * @Date 2015/11/14.
 */

public class Stu implements Serializable {
    String id;
    String name;

    public Stu()
    {

    }

    public Stu(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        Stu stu = (Stu) o;

        if (!id.equals(stu.id))
            return false;
        return name.equals(stu.name);

    }

    @Override
    public int hashCode() {
        int result = id.hashCode();
        result = 31 * result + name.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "Stu{" +
            "id=" + id +
            ", name='" + name + '\'' +
            '}';
    }
}
